<?php
session_start();

// Include access control
%no_login%include_once "%backdirectory%sitereg/regfunctions.php";
%no_login%$MyPage = $_SERVER['PHP_SELF'];
%no_login%$MyAccess = reg_CheckAccess($MyPage,1,'%backdirectory%sitereg/');

// includes
	include_once "%backdirectory%%connectinclude%";
	include_once "%backdirectory%../lib/%class_subpath%CF_Pdo_com.php";
//	include_once "%backdirectory%%class_subpath%CF_form_class.php";
	include_once "%fieldinclude%";
	
// Get keyed row	
	$mode = $_REQUEST['mode'];
	%getkeys%
		
	$qry_list = "%str_query% ";
	%filterkeys%
	print $qry_list;
	
	$array_list = get_array_query($qry_list);
	
	$values = $array_list[0];
	
	//$%edit_instance%->set_valuesarray($array_list);
	%list_fields_str%
		
	?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>cftest form</title>

<link rel="stylesheet" href="%backdirectory%../tplcommon/qctstyle.css" type="text/css">
	<!-- Javascript settings -->
	<script language="javascript"  type="text/javascript">

	//----- Calendar default settings
	// support functions in CF_bodyjs.js
	// To specify the default date - time shown in the visible calendar fields, specify below
	arShowDateDefault = "%A, %B %e, %Y";
	arShowDateFormat = [];
	// To specify the date - time shown in the visible field, adjust below for specific columns
	// - example - arShowDateFormat['lastdate'] = "%B %e, %Y";
	
	//-----Data validation
	// support functions in CF_bodyjs.js
	// The validateData matches an input value agains a regular expression.  IF it meets, it returns True.  If it fails, it re-sets the value and returns false
	// Provide a regular expression in the array arValRegEx with column as key
	// Provide an error message (to appear on valied validation) to the array arValMsg with column as key
	// remeber to backslash twice (escape backslases) and to put reg-ex between backslashes as in example
	arValRegEx = [];
	// Remember to double-backslash your reg-expressions for the string
	// - example - arValRegEx["effectivedate"] = "\\.*\\b";
	// - example - arValRegEx["starttime"] = "\\d{1,2}:\\d\\d";
	
	arValMsg = [];
	// - example - arValMsg["effectivedate"]= "You have to enter something, anything that matches .* ";
	// - example - arValMsg["starttime"] = "Enter a time (hh:mm)";

	<!-- calendar links: stylesheet, main program, language extension and setup-helper -->
	
	</script>
	
	<!-- calendar links: stylesheet, main program, language extension and setup-helper -->
	<link rel="stylesheet" type="text/css" media="all" href="%backdirectory%../lib/jscalendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
	<script type="text/javascript" src="%backdirectory%../lib/jscalendar/calendar.js"></script>
	<script type="text/javascript" src="%backdirectory%../lib/jscalendar/lang/calendar-en.js"></script>
	<script type="text/javascript" src="%backdirectory%../lib/jscalendar/calendar-setup.js"></script>	

	
</head>
<body>
 <script type="text/javascript" src="%backdirectory%../lib/%class_subpath%CF_bodyjs.js"></script>
  <script type="text/javascript" src="%backdirectory%../lib/%class_subpath%CF_ModJsCal.js"></script>


 <div id="Header">
	<?php include "%backdirectory%../tplcommon/header.php" ?>
</div> <!-- End Header -->

 <div id="Menu">
<?php include "%backdirectory%../tplcommon/leftmenu.php" ?>
</div> <!-- End Menu -->

<div id="Content">
<?php //echo $%edit_instance%->make_form('get',$mode); ?>
<form name='edit_form' action='%process_page%' method='get' >
%static_fields%
<input type='submit' value='<?php print $mode ?>' />
<input type='hidden' name='mode' value='<?php print $mode ?>' />
</form>
</div> <!-- End Content -->

<div id="Footer">
<?php include "%backdirectory%../tplcommon/footer.php" ?>
</div>

</body>
</html>